#ifndef TEXTQUERY_H
#define TEXTQUERY_H

#include <set>
#include <map>
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <memory>

class QueryResult;

class TextQuery
{
public:
    using line_no = std::vector<std::string>::size_type;    //行号类型
    QueryResult query(const std::string&)const;
    TextQuery(std::ifstream&);
private:
    std::shared_ptr<std::vector<std::string>> file; //输入文件
    std::map<std::string, std::shared_ptr<std::set<line_no>>> wm;
};

#endif // TEXTQUERY_H
